package org.ds.biz.user;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

@Entity
@DiscriminatorValue("stock")
public class StockTransaction extends AccountTransaction
{
	@Column (name = "is_sale")
	private boolean isSale = false;
	
	@Column (name = "stock_symbol")
	private String stockSymbol = null;
	
	@Column (name = "company_name")
	private String companyName = null;
	
	@Column (name = "num_shares")
	private Integer numShares = 0;
	
	@Column (name = "price_per_share")
	private Double pricePerShare = 0.0;
	
	public StockTransaction()
	{
		super("stock");
	}

	public boolean isSale()
	{
		return isSale;
	}

	public void setSale(boolean isSale)
	{
		this.isSale = isSale;
	}

	public String getStockSymbol()
	{
		return stockSymbol;
	}

	public void setStockSymbol(String stockSymbol)
	{
		this.stockSymbol = stockSymbol;
	}

	public String getCompanyName()
	{
		return companyName;
	}

	public void setCompanyName(String companyName)
	{
		this.companyName = companyName;
	}

	public Integer getNumShares()
	{
		return numShares;
	}

	public void setNumShares(Integer numShares)
	{
		this.numShares = numShares;
	}

	public Double getPricePerShare()
	{
		return pricePerShare;
	}

	public void setPricePerShare(Double pricePerShare)
	{
		this.pricePerShare = pricePerShare;
	}	
}
